<include file="Inc/header" />
<script type="text/javascript">
    function submitFun(act)
    {
        form1.action.value = act;
        form1.submit();
    }
</script>
<div id="body-wrapper">
    <!-- Wrapper for the radial gradient background -->
    <div id="sidebar">
        <include file="Inc/left"/>
    </div>
    <!-- End #sidebar -->
    <div id="main-content">

        <!-- Page Head -->
        <h2>Welcome 来到首页</h2>

        <!-- End .shortcut-buttons-set -->
        <div class="clear"></div>
        <!-- End .clear -->
        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <form name='form1' action="{:U('Home/User/showAll')}" method="get">
                    <ul class="content-box-tabs">
                        <li>关键字：<input class="ui-textbox search_box" name="kw" value="{$_POST['kw']}"
                                       holder="姓名/身份证/学籍号/家长电话"/></li>
                        <li><select name="grade">
                            <option value="0">请选择年级</option>
                            <volist name="sh_grade_array" id="class">
                                <option value="{$class['id']}"
                                <if condition="$class['id'] eq $_REQUEST['grade'] "> selected='selected'</if>
                                >{$class['name']}</option>
                            </volist>
                        </select></li>
                        <li><select name="class">
                            <option value="-1">请选择班级</option>
                            <volist name="sh_class_array" id="class">
                                <option value="{$class['id']}"
                                <if condition="$class['id'] eq $_REQUEST['class'] "> selected='selected'</if>
                                >{$class['name']}</option>
                            </volist>
                        </select></li>
                        <li><select name="poor">
                            <option value="-1"
                            <if condition="$_REQUEST['poor'] eq '-1' "> selected='selected'</if>
                            >全部（含贫困户）</option>
                            <option value="1"
                            <if condition="$_REQUEST['poor'] eq 1 "> selected='selected'</if>
                            >是</option>
                            <option value="0"
                            <if condition="$_REQUEST['poor'] eq 0 "> selected='selected'</if>
                            >否</option>

                        </select></li>
                        <li><select name="term">
                            <option value="-1"
                            <if condition="$_REQUEST['term'] eq '-1' "> selected='selected'</if>
                            >全部</option>
                            <option value="{$current_term}"
                            <if condition="$_REQUEST['term'] eq $current_term "> selected='selected'</if>
                            >已报名</option>
                            <option value="2"
                            <if condition="$_REQUEST['term'] eq 2 "> selected='selected'</if>
                            >未报名</option>

                        </select></li>
                        <li><input type="hidden" id='actioning' name="action" value="cha"/>
                            <button class="ui-button add_goods_type" rel="orange" type="button"
                                    onclick="submitFun('cha');">查询
                            </button>
                            <button class="ui-button add_goods_type" rel="orange" type="button"
                                    onclick="submitFun('excel');">导出数据
                            </button>
                            </td>
                        </li>
                    </ul>
                    <div class="clear"></div>
                </form>
            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">
<form name="myform" action="{:U('Home/User/batch_baoming')}" method="post">
                    <table>
                        <thead>
                        <tr>
                            <th>
                                <input class="check-all" type="checkbox"/>
                            </th>
                            <th>序号</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>身份证号</th>
                            <th>学籍号</th>
                            <th>班级</th>
                            <th>年级</th>
                            <th>籍贯</th>
                            <th>家长</th>
                            <th>电话</th>
                            <th>贫困户</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <tfoot>
                        <tr>
                            <td colspan="4">
                                <span style="float:right;">总数：{$count}   已报名：{$tongji['had']} 未报名：{$tongji['none']}</span>
                            </td>
                            <td>
                               <input type="submit" value="批量报名">
                            </td>

                            <td colspan="9">
                                <div class="pagination">{$pageControl}</div>
                                <!-- End .pagination -->
                                <div class="clear"></div>
                            </td>
                        </tr>
                        </tfoot>
                        <tbody>
                        <volist name="stus" id="user">
                            <tr>

                                <td>
                                    <input name="id[]" value="{$user['id']}" type="checkbox"/>
                                </td>
                                <td>{$user['ids']}</td>
                                <td>{$user['name']}</td>
                                <td>{$user['sex']}</td>
                                <td>{$user['id_number']}</td>
                                <td>{$user['xj_number']}</td>
                                <td>{$user['classname']}</td>
                                <td>{$user['gradename']}</td>
                                <td>{$user['jiguan']}</td>
                                <td>{$user['father_name']}</td>
                                <td>{$user['father_tel']}</td>
                                <td>
                                    <if condition="$user['poor'] eq 1">是</if>
                                </td>
                                <td>
                                    <!-- Icons -->
                                    <if condition="$user['term'] eq NULL">
                                        <a href="{:U('Home/User/baoming',array('id'=>$user['id']))}" title="点击开始报名">
                                            <img src="__PUBLIC__/images/icons/baoming.png" width="80" height="40"
                                                 alt="报名"/></a>
                                        <else/>
                                        <font color="red">已报名</font>
                                    </if>

                                    <a href="{:U('Home/User/showUpdate',array('id'=>$user['id']))}" title="Edit">
                                        <img src="__PUBLIC__/images/icons/pencil.png" alt="Edit"/></a>
                               </td>

                            </tr>
                        </volist>

                        </tbody>
                    </table>
</form>
                </div>
                <!-- End #tab1 -->

            </div>
            <!-- End .content-box-content -->
        </div>

        <include file="Inc/footer"/>
